<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<!-- The HTML 4.01 Transitional DOCTYPE declaration-->
<!-- above set at the top of the file will set     -->
<!-- the browser's rendering engine into           -->
<!-- "Quirks Mode". Replacing this declaration     -->
<!-- with a "Standards Mode" doctype is supported, -->
<!-- but may lead to some differences in layout.   -->

<html>
  <head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
    <title>Mon compte</title>
    
    <link rel='stylesheet' type='text/css' href='css/menu.css' />
   <link rel='stylesheet' type='text/css' href='css/common.css' />
    <link rel='stylesheet' type='text/css' href='css/account.css' />
    <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
  	<script type="text/javascript" src="js/shared.js"></script>
  	<script>
$(document).ready(function(){
    
	$.ajax({
		url : 'account',
		dataType : 'json',
		success : function(data){
			init(data);
			if(data.connected == true){
					$("body").append("<strong>Nombre de points : </strong>"
					        + data.points + "<br/>");
					
					$("body").append("<h4>Légende</h4><table><tr><td><div class='sample win'></div></td><td>gagné</td>"
							+ "<td><div class='sample lost'></div></td><td>perdu</td>"
					        + "<td><div class='sample upcoming'></div></td><td>en cours</td></tr></table>");
					
					$("body").append("<p>Mes paris :</p>");
					$("body").append("<table id='paris'><tr>"
					        + "<th>Type</th>"
					        + "<th>Valeur</th>"
					        + "<th>Montant</th>"
					        + "</tr>");
					for(var i = 0; i < data.paris.length ; i++){
						$("#paris").append("<tr class='" + data.paris[i].status + "'>"
						        + "<td>" + data.paris[i].type + "</td>"
						        + "<td>" + data.paris[i].valeur + "</td>"
						        + "<td>" + data.paris[i].montant + "</td>"
						        + "</tr>");
					}
					$("#paris").append("</table>");
			}
		}
	});
	
});
</script>
  </head>
  <body>
  </body>
</html>
